#include<stdio.h>
int sort(int w[5] ,int a[5])
{
	int i,flag;
	for(i=4;i>=0;i--)
	{
		if(a[i+1]!=0)
			flag=1;
		if(flag==1)
		{
			if(a[i]==0)
				continue;
			if(a[i]==1)		printf("+");
			if(a[i]==-1)	printf("-");
		}
		if(a[i]!=0)
			printf("%d",w[i]); 
	}
}
int main()
{
	int w[]={1,3,9,27,81};
	int n,a[6];
	a[5]=0;
	scanf("%d",&n);
	for(a[0]=-1;a[0]<=1;a[0]++)
		for(a[1]=-1;a[1]<=1;a[1]++)
			for(a[2]=-1;a[2]<=1;a[2]++)
				for(a[3]=-1;a[3]<=1;a[3]++)
					for(a[4]=0;a[4]<=1;a[4]++)
					{
						if( n==(w[0]*a[0] + w[1]*a[1] + w[2]*a[2] + w[3]*a[3] + w[4]*a[4] ) )
							sort(w,a);
					}
	printf("\n");
	return 0;
}
